package com.hzqy.web.ac.weather;

import com.hzqy.service.weather.WeatherForecastServiceBean;
import com.hzqy.web.login.SessionKey;
import com.hzqy.web.vo.weather.WeatherForecastVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("/industry/WeatherForecast")
public class WeatherForecastAction {
	protected final Logger LOG = LoggerFactory.getLogger(getClass());
	@Resource
	private WeatherForecastServiceBean weatherForecastServiceBean;
	
	/**
	 * 获取天气预报信息
	 * @param vo
	 * @return
	 */
	@RequestMapping("/selectWeatherForecastVo")
	@ResponseBody
	public Object selectWeatherForecastVo(HttpSession session,WeatherForecastVo vo) {
		System.out.println("vo=="+vo);
		String areaid = (String) session.getAttribute(SessionKey.SESSION_AREA);
		vo.setAreaCodeid(areaid);
		vo= weatherForecastServiceBean.selectWeatherForecastVo(vo);
		return vo;
	}
	
	
}
